﻿@model OSBLE.Models.Intervention.InterventionItem

@{
    var activityFeedUrl = OSBLEPlus.Logic.Utility.StringConstants.WebClientRoot + "Feed/OSBIDE?component=7";
}

<!doctype html>

<html lang="en">
<head>
    <meta charset="utf-8">

    <title>OSBLE+ Suggestion</title>
    
    <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/bootstrap-3.3.5/css/bootstrap.min.css")" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery-2.0.1.min.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Content/bootstrap-3.3.5/js/bootstrap.min.js")"></script>

    @* highlight.js code syntax highlighting block*@
    <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/themes/highlight/vs.css")" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/highlight.pack.js")"></script>
    <script>hljs.initHighlightingOnLoad();</script>
    @* highlight.js code syntax highlighting block*@

    <link rel="stylesheet" type="text/css" href="@Url.Content("~/Content/interventions.css")?version=1.0" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/Interventions.js")?version=1.01"></script>

    @Html.Partial("_UserHashtagTagScript")

</head>

<body class="intervention-body">
    <div>
        <div class="panel panel-primary">
            <div class="panel-heading intervention-heading">
                <span class="left">
                    <a href="/" style="color: #FFFFFF; text-decoration: none;">
                        <span class="glyphicon glyphicon-circle-arrow-left"></span>
                        <span class="glyphicon glyphicon-dashboard"></span>
                    </a>
                </span>
                Ask a Question!
            </div>
            <div class="panel-body">
                @Html.Partial("_UserFeedbackPrompt", new ViewDataDictionary { { "interventionId", Model.Id } })
                @Html.Partial("_CourseSelect")
                <h4>Your program has build errors. <em>Other classmates'</em> programs also had similar errors recently.</h4>
                <h5>Would you like to ask your classmates about this issue?</h5>

                <div>
                    <div class="left">
                        <h4>Ask the question: </h4>
                    </div>
                    <div class=" btn-right">
                        <button class="btn btn-primary clear-default-text">Clear Template Text</button>
                    </div>
                </div>

                <div id="question-area">
                    <textarea name="ask-a-question">@Model.InterventionTemplateText</textarea>
                    <br />
                    <span>Here's part of my code:</span>
                    <span class="hover-link-edit"><a>(Edit)</a></span><span class="hover-link-save"><a>(Save Changes)</a></span>
                    <div id="code-display-box">
                        <pre><code id="suggested-code">@Model.InterventionSuggestedCode</code></pre>
                    </div>
                    <div id="code-edit-box">
                        <textarea id="suggested-code-edit">@Model.InterventionSuggestedCode</textarea>
                    </div>
                </div>
                <div>
                    <a class="btn btn-primary" href="@activityFeedUrl" role="button" id="view-other-page">View Classmates'<br />Questions</a>
                    <button class="btn btn-primary right" id="post-to-class">Post Question<br /> to Class</button>
                    <button class="btn btn-default right" id="post-to-class-anon"><span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span> Post Question<br /> to Class (Anonymously)</button>                    
                    <span class="right" id="post-success"></span>
                    <span class="right" id="post-error"></span>
                </div>
            </div>
        </div>
    </div>
    <input id="iid" type="hidden" value="@Model.Id" />
    @Html.Partial("_SuggestionFeedbackModal")
</body>
</html>